// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
thread 'AUTOAIM'

REPEAT 
WAIT 0
IF 0AAB: file_exists "CLEO\KEYS.INI"
THEN         
0AF0: 5@ "CLEO\KEYS.INI" "AUTO_AIM" "AIM_KEY"
0AF0: 6@ "CLEO\KEYS.INI" "AUTO_AIM" "FIRE_KEY"
END 
UNTIL IF 0AAB: file_exists "CLEO\KEYS.INI"

 
WHILE TRUE
        WAIT 0
        if 0AD2: 31@ = player $PLAYER_CHAR targeted_actor //IF and SET 
        THEN                                                                              
            if and                                                                        
                056D:   actor 31@ defined                                                 
                803B:   not  31@ == $PLAYER_ACTOR // (int)                                
            THEN
                REPEAT 
                WAIT 0
                IF 8AB0: 5@ 
                JF BREAK
                IF NOT ACTOR.Dead(31@)
                JF BREAK
                
                IF 0AB0: 6@
                THEN 
                    Actor.StorePos(31@, 1@, 2@, 3@)

                    0668: AS_actor $PLAYER_ACTOR rotate_and_shoot_at 1@ 2@ 3@ 500 ms 
                ELSE 0635: AS_actor $PLAYER_ACTOR aim_at_actor 31@ 500 ms
                END
                
                UNTIL IF Actor.Dead(31@)
            END
        END
    END